package StudyCode.summary.mycollection;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class CompareTwoString3DArrays {
	public static boolean equals(String[] left, String[] right) {
		if (left.length != right.length) {
			return false;
		}
		boolean result = true;
		for (int i = left.length - 1; i >= 0; i--) {
			result &= left[i].equals(right[i]);
		}
		return result;
	}

	public static boolean equals(String[][] left, String[][] right) {
		if (left.length != right.length) {
			return false;
		}
		boolean result = true;
		for (int i = left.length - 1; i >= 0; i--) {
			result &= equals(left[i], right[i]);
		}
		return result;
	}

	public static boolean equals(String[][][] left, String[][][] right) {
		if (left.length != right.length) {
			return false;
		}
		boolean result = true;
		for (int i = left.length - 1; i >= 0; i--) {
			result &= equals(left[i], right[i]);
		}
		return result;
	}

}
